home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / dviware / beebe / updates / 00mail.14 < prev    next >
Text File  |  1990-10-01  |  30KB  |  622 lines

  1.  2-Nov-87 11:28:47-MST,30752;000000000001
  2. Date: Mon 2 Nov 87 11:28:45-MST
  3. From: "Nelson H.F. Beebe" <Beebe@SCIENCE.UTAH.EDU>
  4. Subject: DVI driver family update #14
  5. To: "DVI mailing list": ;
  6. cc: BEEBE@SCIENCE.UTAH.EDU
  7. X-US-Mail: "Center for Scientific Computing, South Physics, University of Utah, Salt Lake City, UT 84112"
  8. X-Telephone: (801) 581-5254
  9. Message-ID: <12347446387.22.BEEBE@SCIENCE.UTAH.EDU>
  10.  
  11.                   DVI Driver Family Update #14
  12.                            [01-Nov-87]
  13.  
  14. This issue announces Version 2.10 of the DVI driver family.
  15.  
  16. There has a been a long delay in filling orders for the
  17. software, since I decided in mid-September to place new
  18. requests on hold until 2.10 was complete.  It turned out to
  19. be a much larger job than I expected, since very substantial
  20. modifications were made in two drivers, DVIALW and DVIJEP.
  21. The delay, I believe, has been justified by the substantial
  22. improvements made in these two drivers, plus a large number
  23. of minor editorial changes, plus two new drivers.  The
  24. details are contained in the extracts from 00REVHST.TXT
  25. given below.
  26.  
  27. In a nutshell:
  28.  
  29. ** DVIJEP has completely eliminated the limit on the number of
  30.    fonts per page (previously 16) and the number of fonts per
  31.    document (previously 32); these limits are imposed by the
  32.    HP LaserJet Plus printer itself, and remain unchanged in
  33.    the Series II.
  34.  
  35. ** DVIALW has a radically different internal organization.
  36.    The output is nearly 10% more compact, and obeys a maximum
  37.    line width.  It also is considerably more economical of
  38.    printer virtual memory resources (which are grossly
  39.    inadequate for downloaded-font applications), and it should
  40.    be routinely possible to print 100-page documents on an
  41.    Apple LaserWriter Plus non-stop.  Large characters no
  42.    longer raise printer errors.
  43.  
  44. ** LW78 incorporates changes to eliminate apparent Apple
  45.    LaserWriter printer buffer overrun, which I hope will
  46.    eliminate the "I/O error" conditions we have experienced
  47.    for over 2 years.  Users who have prepared their own local
  48.    PostScript drivers may find it useful to examine the new
  49.    LW78.
  50.  
  51. ** Two experimental drivers for the Epson and Epson clone
  52.    9-pin printers, DVIE72 and DVIEPS, have been added.
  53.  
  54. ** On VAX VMS, the drivers now incorporate dynamic
  55.    determination of the VMS quota on the number of open files,
  56.    preventing them from terminating when a font file open
  57.    fails.
  58.  
  59. ** On Unix, the drivers may now be used as filters, with the
  60.    DVI file coming from stdout, and driver output to stdout,
  61.    eliminating the need to wrap them in a shell script when
  62.    used for printer spooling.
  63.  
  64. ** New debug option 128 for display of text to be set.
  65.  
  66. ** The -d (debug) option can now be specified more than once,
  67.    so you need not add values.  Originally I thought it might
  68.    be useful to have -d0 cancel a previously-typed debug
  69.    request, but this appears less useful than the new
  70.    alternative.
  71.  
  72. ** The -z option is available for 4.xBSD Unix systems (or any
  73.    that have an ioctl(fildes,TIOCSTI,*character) call) for all
  74.    devices.  This requests the driver to type in a command to
  75.    automatically spool the output.
  76.  
  77. ** A Unix man page in troff format (dvi.1l) has been prepared,
  78.    so full on-line documentation of the drivers is now
  79.    available.  This complements the Emacs Info format
  80.    documentation (dviman.texinfo), and the typeset manual-page
  81.    format document (dviman.ltx).  There is insufficient
  82.    commonality in these 3 formats to adopt only one, and
  83.    inventing a suitable subset of troff or LaTeX (which is
  84.    what the TeXinfo format attempts to do, with only limited
  85.    success) would require a substantial effort well beyond the
  86.    time I would be willing to devote to it.
  87.  
  88. ** The drivers now support 256-character fonts, which is
  89.    important for European additions to the Computer Modern
  90.    alphabets, and for oriental fonts.
  91.  
  92. Finally, here are the details from 00REVHST.TXT:
  93.  
  94. [01-Nov-87]     Replaced references to (void)fprintf(..., plotfp)
  95.                 with  references   to   new   macros   OUTF(...),
  96.                 OUTF2(...),  and  OUTF3(...),  or  existing  ones
  97.                 OUTC() and  OUTS().   Replaced all  instances  of
  98.                 putc(*c++,plotfp)   by   "OUTC(*c);c++".    Since
  99.                 putc() is usually a  macro, there is a  potential
  100.                 incorrect side effect  if its  first argument  is
  101.                 evaluated more than once.  Most C implementations
  102.                 use it only in the two branches of a  conditional
  103.                 expression, which is safe.
  104.  
  105. [01-Nov-87]     Completed major overhaul  of dvijep.c.  The  font
  106.                 deletion mechanism  was  not  successful,  partly
  107.                 because the  font  number  was  not  subsequently
  108.                 reset in one place, but mostly because it  causes
  109.                 a page eject.  This  would make it impossible  to
  110.                 print some documents.  dvijep now keeps track  of
  111.                 both the number  of fonts in  use on the  current
  112.                 page,  and  the  total  number  in  use  in   the
  113.                 document.   When  either   of  these  limits   is
  114.                 reached, the characters in  those fonts are  sent
  115.                 as bitmaps, instead of  as downloaded fonts.   It
  116.                 is still possible to have a document which is too
  117.                 complex for the LaserJet to print (raising  error
  118.                 code  21  on  the  printer  front  panel   status
  119.                 display), but that is now a limit imposed by  the
  120.                 printer, rather than the  DVI driver, and  cannot
  121.                 be gotten around.
  122.  
  123.                 There is  room for  further work  here,  however.
  124.                 Most documents  do  not  require  an  excessively
  125.                 large   number    of   fonts.     For    example,
  126.                 dvidriver.ltx uses 23  fonts, and weave.tex  uses
  127.                 15, but the TeXbook uses 54.
  128.  
  129.                 When the DVI driver begins execution, through the
  130.                 call chain main() ->  dvifile() -> readpost()  ->
  131.                 getfntdf()  ->   readfont()  ->   reldfont()   ->
  132.                 read{pk|gf|pxl}() -> newfont(), it normally reads
  133.                 in  the  font  definitions  from  the  DVI   file
  134.                 postamble and assigns  font numbers  in order  of
  135.                 occurrence, and  builds  its  internal  font  and
  136.                 character tables.  Later, as pages are processed,
  137.                 font  changes  occasioned  by  DVI  fnt_num_0  ..
  138.                 fnt_num_63 and fnt1  .. fnt4  commands result  in
  139.                 setting the global  flag font_switched, which  in
  140.                 turn causes setchar() and setstr() to output font
  141.                 switch commands to the device.
  142.  
  143.                 The implication of  this for dvijep  is that  all
  144.                 fonts  beyond  the   first  32   are  marked   as
  145.                 non-downloadable.  In the case of the TeXbook, it
  146.                 turns out  that  this includes  the  heavily-used
  147.                 cmr, cmsy, and cmmi fonts at  5, 6, 7, 8, 9,  and
  148.                 10 pt sizes, which means  that almost all of  the
  149.                 characters set on a page will be sent as bitmaps,
  150.                 instead of as  downloaded characters.   On my  HP
  151.                 LaserJet Plus,  every page  raised printer  error
  152.                 code 21.  This might not happen on an HP LaserJet
  153.                 Series II,  which  can  have  substantially  more
  154.                 memory, but  I haven't  one  locally to  try  the
  155.                 experiment.
  156.  
  157.                 The solution  to this problem  is to  delay  font
  158.                 number assignment  until  the  font  is  actually
  159.                 referenced.  Since a considerably smaller  number
  160.                 of fonts  are needed  on each  page, it  is  then
  161.                 possible  to  download  most   of  them,  and   a
  162.                 font-rich  document  like  the  TeXbook  can   be
  163.                 printed successfully  in  sections.   The  change
  164.                 involves moving the  body of newfont()  to a  new
  165.                 function, makefont(), and  having newfont()  only
  166.                 initialize  the   font_number  with   a   special
  167.                 "undefined" value.   The  macro  SET_CURRENT_FONT
  168.                 has  become   big  enough   that  it   has   been
  169.                 transformed   into    a   function,    setfont().
  170.                 setfont()  now   checks   font_number   for   the
  171.                 undefined  value,  and  in  such  a  case,  calls
  172.                 makefont() to assign the font a number and create
  173.                 it in the printer.  With this change, the TeXbook
  174.                 can be printed successfully.
  175.  
  176. [30-Oct-87]     Changed  vaxvms.c,  gblprocs.h,  openfont.h,  and
  177.                 machdefs.h to  support dynamic  determination  of
  178.                 the limit on  the number  of open  files for  VAX
  179.                 VMS.  This is a VMS quota parameter whose dynamic
  180.                 value depends  on  the  number  of  subprocesses.
  181.                 Previously, a user with  too small a limit  would
  182.                 find the dvi drivers could fail because the  hard
  183.                 limit on the  number of open  font files was  too
  184.                 large.
  185.  
  186. [29-Oct-87]     In LW78.C,  removed typeout  of  final CR  LF  in
  187.                 Get_Msg(), and  inserted system  call to  dismiss
  188.                 the process until the  output buffer is empty  at
  189.                 the start of Put_Packet().
  190.  
  191.                 LW78 had been experiencing I/O error returns from
  192.                 the Apple LaserWriter Plus, and when I  attempted
  193.                 to  copy  a  PostScript  file  directly  to   the
  194.                 printer,  the  same  thing  happened,  only  much
  195.                 earlier in the job.  This raised the suspicion of
  196.                 buffer overrun in the printer.  Three experiments
  197.                 using a  100-page document  with (1)  a  5-second
  198.                 sleep before outputting each buffer, (2)  process
  199.                 dismissal until the buffer was empty, and (3) the
  200.                 Kermit TRANSMIT command (which waits for a prompt
  201.                 from  the  LaserWriter   after  each  line)   all
  202.                 resulted  in  successful  printing,  and  I  have
  203.                 confidence that this change in LW78 will  provide
  204.                 superior performance.
  205.  
  206.                 With the new LW78, I sent dvidriver.dvi-alw  with
  207.                 the modified BOP and EOP definitions given below,
  208.                 and printed the 100 pages at an average rate of 5
  209.                 pages  per  minute.   Virtual  memory  usage  was
  210.                 initially 2Kb to  4Kb per page  while fonts  were
  211.                 being downloaded, and in later pages, dropped  to
  212.                 a low of  1105 bytes/page.  Pages  with that  low
  213.                 figure had only  text set on  them, and no  fonts
  214.                 downloaded, with the text guarded by save/restore
  215.                 sequences.   That   virtual  memory   was   still
  216.                 consumed leads one  to wonder if  there is not  a
  217.                 bug in  the  PostScript  memory  allocation  code
  218.                 which causes  some  "seepage" loss.   If  one  of
  219.                 dvialw's macros were leaving unclaimable  garbage
  220.                 behind, one would expect that the garbage  amount
  221.                 would vary, but many different pages had the same
  222.                 1105  bytes/page   consumption.   Total   virtual
  223.                 memory consumed by the  job was 112Kb, with  78Kb
  224.                 remaining available at end-of-job.
  225.  
  226. [27-Oct-87]     Simplified beginning-of-page and end-of-page code
  227.                 in prtpage.h  by creating  bopact() and  eopact()
  228.                 routines in several drivers, and removed bopact.h
  229.                 and eopact.h (which were previously used only  by
  230.                 dvibit),  including   references   to   them   in
  231.                 makefile.*.
  232.  
  233. [27-Oct-87]     Numerous  small   editorial  changes   for   code
  234.                 consistency, and to reduce the number of warnings
  235.                 from the lint utility.
  236.  
  237. [27-Oct-87]     {Thanks to John Pavel (mcvax!nplpsg!jrp@uunet.uu.net)
  238.                 for urging this change}
  239.                 On Unix only, Version  2.10 now permits input  to
  240.                 come from  stdin, and  output  to go  to  stdout,
  241.                 allowing use  of the  drivers as  filters.   This
  242.                 choice is automatically made  when no file  names
  243.                 are specified on the command line.
  244.  
  245.                 Use of  stdout  for  binary  files  is  generally
  246.                 impossible for  other  operating  systems,  which
  247.                 either make a distinction between text and binary
  248.                 file formats, or use line terminators other  than
  249.                 <LF>,   necessitating    translation   of    Unix
  250.                 end-of-line '\n' on input  and output.  With  the
  251.                 exception of  dvialw,  all  the  drivers  produce
  252.                 binary output files.
  253.  
  254. [27-Oct-87]     {Thanks to Bernhard Nebel (NEBEL@DB0TUI11.BITNET)
  255.                 for useful suggestions}
  256.                 Completed  major   overhaul   of   dvialw.c.    A
  257.                 fundamental  problem  with  existing   PostScript
  258.                 interpreters   is   that   they   lack    garbage
  259.                 collection,  and  the  PostScript  programmer  is
  260.                 expected  to  manage  storage  with  save/restore
  261.                 command  judiciously  wrapped  around  throw-away
  262.                 code.   The  problem   this  poses   for  a   TeX
  263.                 environment is that one does not wish to  discard
  264.                 downloaded  fonts,  since  they  will  likely  be
  265.                 needed again.
  266.  
  267.                 In the previous version of dvialw, the -s and  -v
  268.                 options provided some user  control of this,  but
  269.                 such user control is only of marginal utility.
  270.  
  271.                 It proved  interesting to  install the  following
  272.                 PostScript code  segment immediately  before  the
  273.                 BOJ (beginning of job) command in an output  file
  274.                 from dvialw  produced  from  Appendix  F  of  the
  275.                 TeXBook.   The   TeXbook  uses   54  fonts,   and
  276.                 therefore puts  a sizeable  burden on  a  printer
  277.                 that has only limited font memory.
  278.  
  279. % These provide alternate definitions of BOP and EOP in dvialw.ps
  280. % which cause CPU time and virtual memory statistics to be printed
  281. % at the bottom of each output page
  282. /BOP
  283. {
  284. clear
  285. Mtrx setmatrix
  286. 25 0 translate
  287. vmstatus pop /VMUSED exch def pop
  288. usertime
  289. } bdf
  290. /EOP
  291. {
  292. /#copies exch def
  293. /USERTIMEIN exch def
  294. save
  295. /pt {Resolution 72 div mul} def
  296. /Helvetica-BoldOblique findfont 12 pt scalefont setfont
  297. /SP {12 pt 0 pt rmoveto} def
  298. /PN {SP 10 vmstr cvrs show} def
  299. /vmstr 15 string def
  300. 36 pt 36 pt moveto
  301. ([VMstatus:) show
  302. vmstatus PN PN PN (]) show
  303. SP SP ([VMpage:) show
  304. vmstatus pop exch pop VMUSED sub PN
  305. (]) show
  306. SP SP ([Page time:) show
  307. usertime USERTIMEIN sub PN ( msec]) show
  308. restore
  309. showpage
  310. } bdf
  311.  
  312.                 With this addition, each  page now  carries  both
  313.                 memory usage and (printer) CPU time statistics at
  314.                 the  bottom   of  each   page.   On   the   Apple
  315.                 LaserWriter with  paper  type  "note",  there  is
  316.                 about 250Kb of  virtual memory  available at  job
  317.                 start.   Here   is   a  table   of   the   memory
  318.                 requirements for successive  pages of Appendix  F
  319.                 of the TeXbook:
  320.  
  321.                           ----  -----------  -----------
  322.                           Page  DVIALW 2.09  DVIALW 2.10
  323.                           ----  -----------  -----------
  324.                            431                   4953
  325.                            432                  26057
  326.                            433                   3713
  327.                            434                   9693
  328.                            435     27948        21101
  329.                            436     18971        13421
  330.                            437     15644        10109
  331.                            438     21764        15324
  332.                            439     27064        19596
  333.                            440      8172         6628
  334.                           ----  -----------  -----------
  335.  
  336.                 Version  2.09  reached   a  VM  error   condition
  337.                 (virtual memory  exhausted)  on page  434,  while
  338.                 Version 2.10 was able  to proceed 4 pages  beyond
  339.                 that before hitting the same limit.  Each page in
  340.                 Version 2.10  requires  about  30%  less  virtual
  341.                 memory.
  342.  
  343.                 Initially, I wrote  a short  filter program  that
  344.                 moved the text strings on each page to after  the
  345.                 font download sequences, wrapping  the text in  a
  346.                 save/restore pair to  recover the virtual  memory
  347.                 needed to store  them.  This proved  to be  quite
  348.                 straightforward, requiring only about 60 lines of
  349.                 C code.
  350.  
  351.                 To implement the same  facility in dvialw  proved
  352.                 much more complex, because  I was not willing  to
  353.                 suffer the  performance penalty  of reading  each
  354.                 page of  the  DVI  file twice,  once  to  collect
  355.                 needed fonts, and a second  time to set text  and
  356.                 rules.  Instead,  a completely  new mechanism  is
  357.                 implemented whereby output is channelled  through
  358.                 several new routines, which ultimately reach  the
  359.                 low-level textchr() routine  which gets a  single
  360.                 character to process.   Based on  a global  flag,
  361.                 textchr() either outputs  this immediately  (e.g.
  362.                 for macros,  rules,  and  font  downloading),  or
  363.                 stores it in an  internal buffer (text  setting).
  364.                 On the basis of examination of .dvi-alw files for
  365.                 the DVI  driver  manual,  and  the  TeXbook,  the
  366.                 internal buffer is chosen  to be large enough  so
  367.                 that it will usually only need to be dumped  once
  368.                 per page.
  369.  
  370.                 PostScript loop  tests on  the Apple  LaserWriter
  371.                 Plus (Version  38.0  PostScript)  give  execution
  372.                 times of about 0.25 msec for one iteration of  an
  373.                 empty loop, determined by executing
  374.  
  375.                 usertime 10000 {} repeat usertime exch sub
  376.  
  377.                 and 55 msec for one save/restore pair:
  378.  
  379.                 usertime 1000 {save restore} repeat usertime exch sub
  380.  
  381.                 Consequently,  one  does   NOT  want   to  do   a
  382.                 save/restore around every string, but only around
  383.                 large groups of strings.
  384.  
  385.                 Because of  the use  of relative  coordinates  in
  386.                 most output typeset text (the T macro instead  of
  387.                 the S  macro), and  the  use of  remembered  rule
  388.                 widths (w and h in the B and Q macros), it is not
  389.                 trivial to correctly handle the case of more than
  390.                 one  bufferful   per  page   (since   intervening
  391.                 non-buffered output  might  change  the  font  or
  392.                 current point), and it took a considerable number
  393.                 of iterations to  get it working  satisfactorily,
  394.                 with the buffer size temporarily set artificially
  395.                 low.
  396.  
  397.                 Having  the  output  being  filtered  through   a
  398.                 central location, textchr(), has made it possible
  399.                 to further economize on the output volume (e.g by
  400.                 collapsing    <letter><newline><open-paren>    to
  401.                 <letter><open-paren>,   and   to   more   closely
  402.                 approach  a  constant  line  width  (except   for
  403.                 PostScript from  a \special{}  command, which  is
  404.                 output verbatim).   Some operating  systems  have
  405.                 trouble with  long lines  in files,  and  Version
  406.                 2.10 should now largely remove this problem.
  407.  
  408.                 The  line  breaking   algorithm  implemented   in
  409.                 textchr() and  textflush() is  far from  trivial,
  410.                 because PostScript does  not uniformly  recognize
  411.                 <backslash><newline> as  a continuation  sequence
  412.                 that can be discarded;  instead, it permits  this
  413.                 continuation  mechanism  only  in   parenthesized
  414.                 strings.    Otherwise,    comments   cannot    be
  415.                 continued,   angle-bracketed   strings   can   be
  416.                 continued by simply inserting a bare newline, and
  417.                 elsewhere, a  newline can  be  used any  place  a
  418.                 blank  is  used.   Some  of  the  comment   lines
  419.                 produced by dvialw are  long; they are now  split
  420.                 automatically by  placing a  hyphen in  the  last
  421.                 column of the line,  and continuing with "%-"  on
  422.                 the next line.  Any software that takes advantage
  423.                 of the %%PageTable at the end will therefore need
  424.                 adjusting (I  doubt  that  any  exists,  so  this
  425.                 change does not concern  me).  It is  regrettable
  426.                 that the PostScript developers did not give  line
  427.                 continuation more thought.
  428.  
  429.                 Font  change  commands   are  now  defined   more
  430.                 compactly as  "F#" or  "F##",  where "#"  is  the
  431.                 sequential number of  the font  in the  document.
  432.                 This further helps to reduce output volume.   The
  433.                 initial font definitions (the NF macro) still use
  434.                 the full name, and carry a comment with the  font
  435.                 file name, so it is still possible to easily find
  436.                 out what font file was  used for any part of  the
  437.                 output.  The problem of corrupted font files  has
  438.                 come to my attention on several occasions, so  it
  439.                 is worthwhile  to  maintain  this  connection  in
  440.                 dvialw, which is  the only  driver that  produces
  441.                 human-readable printer output.
  442.  
  443.                 On Appendix  F  of  the  TeXbook,  these  changes
  444.                 reduced the output file size by about 8% compared
  445.                 to Version 2.09, and about 9% when  PS_SHORTLINES
  446.                 was non-zero.   On  the  DVI  driver  manual  (99
  447.                 pages), the  file  size from  Version  2.10  with
  448.                 PS_SHORTLINES defined was  15% shorter than  that
  449.                 from   Version    2.09.    Since    a    non-zero
  450.                 PS_SHORTLINES produces marginally smaller output,
  451.                 it is now  the default  for all  implementations,
  452.                 but  it  can  be  overridden  by  a  compile-time
  453.                 redefinition.
  454.  
  455. [22-Oct-87]     {Thanks to Marcus Moehrmann (marcus%fkihh@unido.uucp)}
  456.                 Added drivers dvieps and  dvie72 for Epson  9-pin
  457.                 printers and compatibles.  dvieps  is for 240H  x
  458.                 216V  resolution,  and  dvie72  for  60H  x   72V
  459.                 resolution  (same   as  dviprx   for   Printronix
  460.                 printers).
  461.  
  462.                 It was necessary to make  a number of changes  to
  463.                 the submitted code  to bring  it up-to-date  with
  464.                 the rest  of the  family, and  to conform  to  my
  465.                 coding practices.  Since I  do not have an  Epson
  466.                 printer  on  which  to  test  this  locally,  the
  467.                 version     number     carries     the     suffix
  468.                 "[experimental]".  The  same  suffix  appears  in
  469.                 dvica2.  These will be  removed when the  drivers
  470.                 are considered ready for final release, based  on
  471.                 positive user feedback.
  472.  
  473. [22-Oct-87]     Added  debug option 128 (DBG_SET_TEXT) to display
  474.                 each piece of  text set by  the driver,  together
  475.                 with its page coordinates  in dots, and its  font
  476.                 name.  This of course produces voluminous output,
  477.                 but is quite handy when you are trying to step  a
  478.                 long way into execution to track down a bug.
  479.  
  480. [22-Oct-87]     All debug options have been turned into symbolic
  481.                 references, e.g.
  482.  
  483.                 if (DBGOPT(DBG_OFF_PAGE))
  484.  
  485.                 instead of
  486.  
  487.                 if (debug_code & 32)
  488.  
  489.                 It was clearly a mistake not to have done this in
  490.                 the first place.   I also  wish that  I had  made
  491.                 these  options  sequential  numbers,  instead  of
  492.                 powers of two,  but it  is probably  too late  to
  493.                 change that now.
  494.  
  495. [12-Oct-87]     Edited dviman.texinfo to bring it up-to-date with
  496.                 dvi.1l and dviman.ltx.
  497.  
  498. [01-Oct-87]     Created Unix-style man page file, dvi.1l.
  499.  
  500. [01-Oct-87]     Added  support  for  a  "-z"  option  (typein  of
  501.                 "DVISPOOL dvifilename") for 4.xBSD Unix  systems,
  502.                 which  have  imitated  TOPS-20's  STI%  (Simulate
  503.                 Terminal Input) JSYS facility with  ioctl(fildes,
  504.                 TIOCSTI, *char).
  505.  
  506. [30-Sep-87]     {Thanks to Stefan Kronberg (ZEFFI@FINABO.BITNET)}
  507.                 Added support  of  font  files  with  up  to  256
  508.                 characters.  Normal TeX Computer Modern fonts use
  509.                 only 128 characters per font, but extensions  for
  510.                 European  alphabets,  and  Japanese  fonts,  will
  511.                 require more than  128.
  512.  
  513.                 Unfortunately, this was not quite as trivial as I
  514.                 had  originally   intended,  where   the   values
  515.                 LASTPXLCHAR and NPXLCHARS in gendefs.h need  only
  516.                 be increased  from 127  and 128  to 255  and  256
  517.                 respectively.  The problem is that several  loops
  518.                 used code like
  519.  
  520.                 BYTE k;
  521.                 ...
  522.                 for (k = FIRSTPXLCHAR; k <= LASTPXLCHAR; ++k)
  523.  
  524.                 With LASTPXLCHAR = 255,  the last loop  iteration
  525.                 will increment k to 256,  but since it is a  byte
  526.                 value, this  wraps to  0,  and the  loop  becomes
  527.                 infinite on a  byte-oriented machine.  This  made
  528.                 it necessary to retype the offending loop indices
  529.                 as UNSIGN16.
  530.  
  531.                 The context  diff listing  for these  changes  is
  532.                 rather long  (about  1200  lines), so  I  do  not
  533.                 include it here.
  534.  
  535. [30-Sep-87]     Changed -d option processing in option.h to allow
  536.                 multiple -d  options  to accumulate,  instead  of
  537.                 requiring them to be set with one -d option.  The
  538.                 change is simple: replace
  539.  
  540.                 debug_code = (BYTE)atoi(optstr+2);
  541.  
  542.                 by
  543.  
  544.                 debug_code |= (BYTE)atoi(optstr+2);
  545.  
  546.  
  547. [29-Sep-87]     Because  of  problems  on  record-oriented   file
  548.                 systems (VAX VMS being  the worst offender),  the
  549.                 code in dvialw.c does more when PS_SHORTLINES  is
  550.                 defined; it now keeps track of output widths, and
  551.                 will not produce output lines more than a  couple
  552.                 of  characters   longer  than   a  fixed   value,
  553.                 PS_MAXWIDTH.  However, no such limit is placed on
  554.                 comments, or  macros  retrieved  from  dvialw.ps;
  555.                 both of these are already of limited length.
  556.  
  557.                 Changed machdefs.h to  allow PS_SHORTLINES to  be
  558.                 set at compile time.
  559.  
  560.                 A single experiment on a 20-page DVI file  showed
  561.                 that the .dvi-alw output was about 3% longer when
  562.                 a version of  dvialw with  PS_SHORTLINES set  was
  563.                 used.
  564.  
  565. [29-Sep-87]     {Thanks to John Pavel (mcvax!nplpsg!jrp@seismo.css.gov)
  566.                 and Brendan McKay (munnari!anucsd.oz!dbm@seismo.css.gov)}
  567.  
  568.                 The code in dvialw.c  in functions setchar()  and
  569.                 setstr() emits a save/restore pair around a large
  570.                 character  font   definition.    On   the   Apple
  571.                 LaserWriter Plus (which I only recently got as  a
  572.                 replacement for our stolen ALW), this results  in
  573.                 a "Fatal system  error @ 0X2e6bec".   The fix  is
  574.                 fortunately simple.  Change  those two  instances
  575.                 of
  576.  
  577.                 OUTS("save");
  578.  
  579.                 (but NOT the  one in special()) to
  580.  
  581.                 OUTS("save /temporary_font NF 1 /temporary_font SF");
  582.  
  583.                 This will put the  character in a temporary  font
  584.                 which is discarded  when the  restore command  is
  585.                 executed.  Here is simple test file using cminch;
  586.                 it produces a large (~400Kb) .dvi-alw file.
  587.  
  588. % test for dvialw downloading of large characters
  589. \font\bigfont=cminch
  590. This file tests a DVI driver's capability to support downloading
  591. of large characters.  The following uninteresting tables of the
  592. Roman alphabet are printed in font {\it cminch\/}.
  593. \bigfont
  594. \obeylines
  595. ABC
  596. DEF
  597. GHI
  598. JKL
  599. MNO
  600. PQR
  601. STU
  602. VWX
  603. YZ
  604. \vfill\eject\end
  605.  
  606.  
  607. [29-Sep-87]     {Thanks to John Pavel (mcvax!nplpsg!jrp@seismo.css.gov)}
  608.                 Removed  obsolete   SHORTLINES  references   from
  609.                 machdefs.h; PS_SHORTLINES remains, and can now be
  610.                 set in machdefs.h, instead  of only in  dvialw.c.
  611.                 The default setting in machdefs.h now is
  612.  
  613.                 #define PS_SHORTLINES 0
  614.  
  615.                 and dvialw.c now has
  616.  
  617.                 #ifndef PS_SHORTLINES
  618.                 #define PS_SHORTLINES   0  /* run with long output lines */
  619.                 #endif
  620.  
  621. -------
  622.